'use strict'

class user {
    
  constructor (db) {
    this.db = db
    this.tableName = 'user_list'
  }

  async get (id) {
    let sql = `SELECT * FROM ${this.tableName} WHERE user_id = $$${id}$$`
    let u = await this.db.query(sql)
    if (u.rowCount <= 0) {
      return null
    }
    return u.rows[0]
  }



}

module.exports = user

